import React, { Component } from 'react';
import $ from "jquery";
import "../css/base.css";
import "../css/myPage.css";
import {connect} from "react-redux";
import {BrowserRouter as Router, Route,Link} from 'react-router-dom';


class Mypages extends Component {
  componentDidMount(){
	var that = this;
	 console.log(this.props.userData)
  }
  render() {
	return (
		<div className="components page">
			<div className="header">
				<img className="user_icon" src="https://pic.maizuo.com/usr/default/maizuomoren66.jpg" alt="图片显示异常"/>
				<div className="msg">
					<h3>手机用户{this.props.userData}</h3>
					<p>ID:123456789</p>
					<a>退出</a>
				</div>
			</div>
			<ul className="page_list">
				<li>
					<p>
						<span><i className="iconfont"></i>影票订单</span>
						<span><em>0</em>张<i className="iconfont">&#xe649;</i></span>
					</p>
				</li>
				<li>
					<p>
						<span><i className="iconfont"></i>商城订单</span>
						<span><i className="iconfont">&#xe649;</i></span>
					</p>
				</li>
				<li>
					<p>
						<span><i className="iconfont"></i>演出订单</span>
						<span><i className="iconfont">&#xe649;</i></span>
					</p>
				</li>
				<li>
					<p>
						<span><i className="iconfont"></i>我的现金券</span>
						<span><em>0</em>张<i className="iconfont">&#xe649;</i></span>
					</p>
					<p>
						<span><i className="iconfont"></i>账户余额</span>
						<span><em>0</em>元<i className="iconfont">&#xe649;</i></span>
					</p>
					<p>
						<span><i className="iconfont"></i>我的卖座卡</span>
						<span><em>0</em>张<i className="iconfont">&#xe649;</i></span>
					</p>
				</li>
				<li>
					<p>
						<span><i className="iconfont"></i>设置</span>
						<span><i className="iconfont">&#xe649;</i></span>
					</p>
				</li>
			</ul>
		</div>
	)
  }
	
}

var Mypage = connect(
   function(state, ownProps) {
  	console.log(state)
	return {
		 userData:state.userMsg
	}
  },
  function(dispatch, ownProps) {
   return {
		
	}
  }
)(Mypages);

export default Mypage;